UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oFzSdS79/wQYxA6c0EuSK9mUcWesdwlNaONdMrOsfNE='
WHERE
key_id = '72c62b1b5a75014d5f5ed2fac5740e81dc7d8bcc5969b11509b09e7cc578cd7d'
AND (
token = 'oFzSdS79/wQYxA6c0EuSK9mUcWesdwlNaONdMrOsfNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)