UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TPVsojc4xgMwXf5AFxRhDZNa+enb3C3+btmqMMaJ2XQ='
WHERE
key_id = 'b465ab0d75c1bb9b9a4982af38445b306c88eba9c9b1310f06f91ceeca4c4ee2'
AND (
token = 'TPVsojc4xgMwXf5AFxRhDZNa+enb3C3+btmqMMaJ2XQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)