UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'srcoihoesf/Qj84+jA+h2Vg16A4MEpWzEf8mZD4AFBk=' 
WHERE 
  key_id = 'd2df4a878987de700bb8ae12d5b297f881687492c70c6cd7fcfaa457a05e49a0' 
  AND (
    token = 'srcoihoesf/Qj84+jA+h2Vg16A4MEpWzEf8mZD4AFBk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030