UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '92WqxAxxMSX0UUK+I9++oB4BUig0PQE1sKudFlm2FEc=' 
WHERE 
  key_id = '55ebbf061f7df4bead2ed5dda225446a0ae4546bdfc065c1111e14da46db9ef3' 
  AND (
    token = '92WqxAxxMSX0UUK+I9++oB4BUig0PQE1sKudFlm2FEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028