UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hetm2kpj0jRze/pPlSe5KxKkARxUkbcrUZDR2alaH7o='
WHERE
key_id = 'fde526fc1fcd36ea26fed5411a6ca0f10202fe1baf2df53803feb16f7ac12528'
AND (
token = 'Hetm2kpj0jRze/pPlSe5KxKkARxUkbcrUZDR2alaH7o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)