UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/xTwfoow6hK+5Cy83foq2450W8kELJfptPTbXkoHzBw='
WHERE
key_id = '04441761b3a3476335f7c1abcdacdd484b2a4e36d365c61b195b1d5b587868b9'
AND (
token = '/xTwfoow6hK+5Cy83foq2450W8kELJfptPTbXkoHzBw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)