UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wVIa4/uh2UJ7SXVFWzR7+6YdtPfuQo4fqzFGFNJEmig='
WHERE
key_id = '28a154810d0418afad5c8efc5efec9fcbd5f783c442da0aac796d7f4a8fde288'
AND (
token = 'wVIa4/uh2UJ7SXVFWzR7+6YdtPfuQo4fqzFGFNJEmig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)