UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zR3v/M27YX4y6N3yf1kLnm7RZObrN60u4NOSbkh8M+k=' 
WHERE 
  key_id = 'dedcbbe6dc6db519a2780c03dc136f4006e5c88eceb753841ad69d161e616890' 
  AND (
    token = 'zR3v/M27YX4y6N3yf1kLnm7RZObrN60u4NOSbkh8M+k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037