UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/TCKhBQgGM4MVC+AppeivGuUB5xoileCAJdgyGgjBaw=' 
WHERE 
  key_id = '12e1c8086ded926828fd1e4c79adf2a6b84f7bb9110d0ad22c1cbbc58a00740e' 
  AND (
    token = '/TCKhBQgGM4MVC+AppeivGuUB5xoileCAJdgyGgjBaw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028