UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l2leabpDz1DRdNTkRdP6Ia6sLBX3i4bQyx2FhlxzDhw='
WHERE
key_id = '98722d3f217878da60bc20f15a5057c9532ccca7aeef371d887a5cbd1f3561a6'
AND (
token = 'l2leabpDz1DRdNTkRdP6Ia6sLBX3i4bQyx2FhlxzDhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)