UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vpg73Y5bJUPwsGeR6FvUxZtfuiNSctif8RL5iVe7B5A='
WHERE
key_id = '2d579982777a0c57aa2c190240e41fa8e89c157505b768925ba08d1ff55bb772'
AND (
token = 'vpg73Y5bJUPwsGeR6FvUxZtfuiNSctif8RL5iVe7B5A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)