UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'T0Jx65YkYaeOGJ8noPquACu/ClIJmC+VcMszbFxeIHg=' 
WHERE 
  key_id = '0c4513de68a29a507b03b2837b0406e7edabfc418cddebc2754da6db10908b05' 
  AND (
    token = 'T0Jx65YkYaeOGJ8noPquACu/ClIJmC+VcMszbFxeIHg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036