UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AcbME84BxsH6FEQ6mB23GJQzaK/eTpV9poIWKLGxJzc='
WHERE
key_id = '89e05866dde5a35e8357f1618ff33795ea782c52026f18e75553e423c0863d0b'
AND (
token = 'AcbME84BxsH6FEQ6mB23GJQzaK/eTpV9poIWKLGxJzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)