UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qmk4IAaMZDP7zeANhlQofy0GlSCoR8nUakK5yRztKWk=' 
WHERE 
  key_id = 'b8ccca09d91239570127f4313313b149a7815ab374d5814c99798ee5109fdfee' 
  AND (
    token = 'qmk4IAaMZDP7zeANhlQofy0GlSCoR8nUakK5yRztKWk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034