UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MbFbQrhDE1uSkqJ9JxpkLmUclK46nMhNfFzUGiIAhS8='
WHERE
key_id = '76b2af11ab0dd334a0d0117477f03922e2da312f6700d874eb1dbf8c99c3f775'
AND (
token = 'MbFbQrhDE1uSkqJ9JxpkLmUclK46nMhNfFzUGiIAhS8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)