UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'muhR2RG0dt/dnBzRtAa4u/HUcBJNoz9Xin4L/hMjbxw='
WHERE
key_id = '71f294790031ceb2bc8627dcb9ac10a0157a7b4cac1ebf2fd6515378be806770'
AND (
token = 'muhR2RG0dt/dnBzRtAa4u/HUcBJNoz9Xin4L/hMjbxw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)