UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4+j+aBiG+jfUfsQAknc2ZOS/neYBrrbbng2/VTk9A1w=' 
WHERE 
  key_id = '95a56e61b34ac84b83f67d436bf094e6f72654476df9a423ed8963e43dda4d10' 
  AND (
    token = '4+j+aBiG+jfUfsQAknc2ZOS/neYBrrbbng2/VTk9A1w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021