UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HsPZ7eLLu4rjdDUmQIs+JTiEcB8Wx9ibrprZF4W4xaY='
WHERE
key_id = '68a2be0e9805de3c77f8947d8cfa449efa363410198a57db7457b7f94e0d5b96'
AND (
token = 'HsPZ7eLLu4rjdDUmQIs+JTiEcB8Wx9ibrprZF4W4xaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)