UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVnSus5kTg2InPExq4r/EFvRyt+vXSBXbokH4LsOF9c='
WHERE
key_id = 'c3cb936df26fffb914ef835e33aebc4e2fd23fbe0dbdb15873aeb2f114b46fa5'
AND (
token = 'GVnSus5kTg2InPExq4r/EFvRyt+vXSBXbokH4LsOF9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)