UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'F/y+0mDMstjFM7wPgc4X9GWWjp7Gkoi9FXTDbRMdjNU=' 
WHERE 
  key_id = '4c6b337abfa7d0a0a9119c0b1a0af7725e37b9bc00cd4f841dcb08267f76b390' 
  AND (
    token = 'F/y+0mDMstjFM7wPgc4X9GWWjp7Gkoi9FXTDbRMdjNU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018