UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IxYJ084o/2suK74gOMKQmLUAK9ptNEOn4MCkw09o6BE='
WHERE
key_id = 'fc8018b5e1192e99f14026bfd1f3113b7a60dd2445471b4151ccdb9b4c9e5d44'
AND (
token = 'IxYJ084o/2suK74gOMKQmLUAK9ptNEOn4MCkw09o6BE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)