UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4JbMdBI/GmZmYNOzFrxVYgROBv5wbrjILEr/cEznZlM='
WHERE
key_id = '136fd979f4e33e8ca85e92c05bc3e9f75018bf07ba6798709b47044da921e138'
AND (
token = '4JbMdBI/GmZmYNOzFrxVYgROBv5wbrjILEr/cEznZlM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)