UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lnui4Aa0/8v3zFv33+OgHpxsZAZB690P8KRkWcWO8JM='
WHERE
key_id = 'ef755481771ce2ed4ae3b59d94d4108858ce02d480435ba7d0ee01ce7a050b15'
AND (
token = 'lnui4Aa0/8v3zFv33+OgHpxsZAZB690P8KRkWcWO8JM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)