UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eh+Ir3/NKyGut9qd2JVbir4V6GnRYDfCyvKNu63XtEw='
WHERE
key_id = '54c1e21f91bbf8b5a0b7031a34ad5955e4607d638ac578862dfa79de93bd0f14'
AND (
token = 'eh+Ir3/NKyGut9qd2JVbir4V6GnRYDfCyvKNu63XtEw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)