UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9PkEb+5bqgkuSRSvvv0BlBFZnepxV0aN9/u3DdpZdzc='
WHERE
key_id = '42ff6b8c99e1cf557fa938401f38c4c750f2c170983f332381cdecfb3142de2c'
AND (
token = '9PkEb+5bqgkuSRSvvv0BlBFZnepxV0aN9/u3DdpZdzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)