UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bIDmn8f/KxbGX9zDnRKk8bt6f2N37SbE3B9135UXBP0=' 
WHERE 
  key_id = '6bc9e3023d90040b65d74016dd66d63af512206a6ca4ddd1d01bf673b84430cc' 
  AND (
    token = 'bIDmn8f/KxbGX9zDnRKk8bt6f2N37SbE3B9135UXBP0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044