UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8ZIgp71U1WGpXhDIF35Vf9wxFIk9N41OW7oUm/csRfQ='
WHERE
key_id = '735a3944a2c9f93b45f467205a82b482e00109ba98dbf7ed9cb5c03d4eea952b'
AND (
token = '8ZIgp71U1WGpXhDIF35Vf9wxFIk9N41OW7oUm/csRfQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)